package com.common.result.demo.domain;

/**
 * Created by zhanghy on 2019-09-19
 * description
 */

public class UserVo {
    private long id;
    private String name;
    private int age;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public UserVo() {

    }

    private UserVo(Builder builder) {
        this.id = builder.id;
        this.name = builder.name;
        this.age = builder.age;
    }

    public static class Builder {
        private long id;
        private String name;
        private int age;

        public Builder id(long id) {
            this.id = id;
            return this;
        }

        public Builder name(String name) {
            this.name = name;
            return this;
        }

        public Builder age(int age) {
            this.age = age;
            return this;
        }

        public UserVo build() {
            return new UserVo(this);
        }
    }

    public static Builder builder() {
        return new Builder();
    }
}
